package com.yocard.yxyd.ui.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;

import com.yocard.yxyd.R;

import me.zhouzhuo.zzhorizontalprogressbar.ZzHorizontalProgressBar;

/**
 * Created on 2019/4/19.
 */
public class ProgressDialog extends Dialog {

    protected ZzHorizontalProgressBar progressBar;

    public ProgressDialog(@NonNull Context context) {
        super(context, R.style.MyDialogStyle);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_update_progress);
        progressBar = findViewById(R.id.pb);
        setCancelable(false);
        setCanceledOnTouchOutside(false);
    }

    public void setProgress(int progress){
        progressBar.setProgress(progress);
    }
}
